Optimal. Leaf size=103 \[ -\frac{7 a^4 \log (\sin (c+d x))}{d}-\frac{a^4 \log (\cos (c+d x))}{d}-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}-8 i a^4 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.217709, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {3553, 3593, 3589, 3475, 3531} \[ -\frac{7 a^4 \log (\sin (c+d x))}{d}-\frac{a^4 \log (\cos (c+d x))}{d}-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}-8 i a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3553
Rule 3593
Rule 3589
Rule 3475
Rule 3531
Rubi steps
\begin{align*} \int \cot ^3(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{1}{2} \int \cot ^2(c+d x) (a+i a \tan (c+d x))^2 \left (-6 i a^2+2 a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}-\frac{1}{2} \int \cot (c+d x) (a+i a \tan (c+d x)) \left (14 a^3+2 i a^3 \tan (c+d x)\right ) \, dx\\ &=-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}-\frac{1}{2} \int \cot (c+d x) \left (14 a^4+16 i a^4 \tan (c+d x)\right ) \, dx+a^4 \int \tan (c+d x) \, dx\\ &=-8 i a^4 x-\frac{a^4 \log (\cos (c+d x))}{d}-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}-\left (7 a^4\right ) \int \cot (c+d x) \, dx\\ &=-8 i a^4 x-\frac{a^4 \log (\cos (c+d x))}{d}-\frac{7 a^4 \log (\sin (c+d x))}{d}-\frac{\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{2 d}-\frac{3 i \cot (c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{d}\\ \end{align*}
Mathematica [A] time = 1.94054, size = 133, normalized size = 1.29 \[ \frac{a^4 \csc ^2(c+d x) (\cos (4 d x)+i \sin (4 d x)) \left (-7 \log \left (\sin ^2(c+d x)\right )-\log \left (\cos ^2(c+d x)\right )-8 i \csc (c) \cos (c+2 d x)+\cos (2 (c+d x)) \left (7 \log \left (\sin ^2(c+d x)\right )+\log \left (\cos ^2(c+d x)\right )+16 i d x\right )+8 i \cot (c)-16 i d x-2\right )}{4 d (\cos (d x)+i \sin (d x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 80, normalized size = 0.8 \begin{align*} -{\frac{{a}^{4}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-8\,i{a}^{4}x-{\frac{8\,i{a}^{4}c}{d}}-7\,{\frac{{a}^{4}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{4\,i{a}^{4}\cot \left ( dx+c \right ) }{d}}-{\frac{{a}^{4} \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.63601, size = 92, normalized size = 0.89 \begin{align*} -\frac{16 i \,{\left (d x + c\right )} a^{4} - 8 \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 14 \, a^{4} \log \left (\tan \left (d x + c\right )\right ) + \frac{8 i \, a^{4} \tan \left (d x + c\right ) + a^{4}}{\tan \left (d x + c\right )^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.25128, size = 373, normalized size = 3.62 \begin{align*} \frac{10 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} - 8 \, a^{4} -{\left (a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 7 \,{\left (a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )}{d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.21115, size = 114, normalized size = 1.11 \begin{align*} \frac{a^{4} \left (- 7 \log{\left (e^{2 i d x} - e^{- 2 i c} \right )} - \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}\right )}{d} + \frac{\frac{10 a^{4} e^{- 2 i c} e^{2 i d x}}{d} - \frac{8 a^{4} e^{- 4 i c}}{d}}{e^{4 i d x} - 2 e^{- 2 i c} e^{2 i d x} + e^{- 4 i c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.57263, size = 207, normalized size = 2.01 \begin{align*} -\frac{a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 128 \, a^{4} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) + 8 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) + 8 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + 56 \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - 16 i \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{84 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 16 i \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - a^{4}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]